package com.assignwork.vo;

import com.assignwork.util.BigDecimalSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;

@Data
public class DailyPlanMobileVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主键id")
    private Long id;

    /** 创建时间 */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /** 更新时间 */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    /** 计划日期 */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @ApiModelProperty(value = "计划日期")
    private LocalDate planDate;

    /** 元数据ID */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "元数据ID")
    private Long sourceId;

    /** 船舶 */
    @ApiModelProperty(value = "船舶")
    private String shipName;

    private String voyage;

    /** 泊位 */
    @ApiModelProperty(value = "泊位")
    private String shipBerthKey;
    private String shipBerthName;

    /** 货类 */
    @ApiModelProperty(value = "货类")
    private String cargoType;
    private String cargoTypeName;

    /** 进出口 */
    @ApiModelProperty(value = "进出口")
    private String impExp;
    private String impExpName;

    /** 装卸 */
    @ApiModelProperty(value = "装卸")
    private String workTypeKey;
    private String workTypeName;

    /** 散杂货 */
    @ApiModelProperty(value = "散杂货")
    private String packageBulkKey;
    private String packageBulkName;

    /** 总计划吨 */
    @ApiModelProperty(value = "总计划吨")
    @JsonSerialize(using = BigDecimalSerializer.class, nullsUsing = NullSerializer.class)
    private BigDecimal planTotal;

    /** 备注 */
    @ApiModelProperty(value = "备注")
    private String remark;

    private Integer isEmphasis;

    private Integer status;

    @JsonSerialize(using = BigDecimalSerializer.class, nullsUsing = NullSerializer.class)
    private BigDecimal lineTon;

    private String lineCount;

    private String lineCabins;

    private String lineCabinNames;

}
